<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let num1 = parseInt(prompt("请输入第一个数字："));
    let sp = prompt("请输入要进行的运算符号：（+为加，-为减，*为乘，/为除");
    let num2 = parseInt(prompt("请输入第二个数字："));
    switch (sp) {
      case "+":
        alert("两个数的加法操作结果是：" + (num1 + num2));
        console.log(num1 + num2);
        break;
      case "-":
        alert("两个数的减法操作结果是：" + (num1 - num2));
        console.log(num1 - num2);
        break;
      case "*":
        alert("两个数的乘法操作结果是：" + (num1 * num2));
        console.log(num1 * num2);
        break;
      case "/":
        alert("两个数的除法操作结果是：" + (num1 / num2));
        console.log(num1 / num2);
        break;
      default:
        console.log("请输入正确的运算符号！！");
        break;



    }
  </script>
</body>

</html>